import { App } from 'vue'
import { registerFormDetailProvider } from '@ibiz-template/runtime'
import { withInstall } from '@ibiz-template/vue3-util'
import FormSearchItem from './form-search-item'
import { FormSearchItemProvider } from './provider'

export const IBizFormSearchItem = withInstall(FormSearchItem, function (v: App) {
  v.component(FormSearchItem.name, FormSearchItem)
  registerFormDetailProvider('FORM_USERCONTROL_SEARCH_ITEM', () => new FormSearchItemProvider())
  registerFormDetailProvider('FORM_USERCONTROL_SearchItem', () => new FormSearchItemProvider())
})
